package cn.com.godliu.gatewaydemo1.controller;

import cn.com.godliu.gatewaydemo1.utils.HttpClientUtil;
import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.client.HttpClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


@Slf4j
@RestController
public class OauthClientDetailsController {

    /**
     * 认证服务的回调，打印授权码code
     *
     * @param code
     * @return
     */
    @GetMapping("/authfallback")
    public String authorizationBack(String code) {
        log.info("授权码:" + code);
        //可以考虑把请求到的code保存起来，然后请求token
        return "授权码:" + code;
    }
}
